package com.zyj.springboothapim.controller;


import com.zyj.springboothapim.bean.Repair;
import com.zyj.springboothapim.service.RepairService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
//这个是默认json接收和发送@RestController
@RequestMapping("/Repair")
public class RepairController {
    RepairService repairService;

    @Autowired
    public void setRepairService(RepairService repairService)
    {
        this.repairService = repairService;
    }


    //获取维修表repair_table所有信息
    @RequestMapping(value = "/selectRepair" ,method = {RequestMethod.POST,RequestMethod.GET})
    @ResponseBody
    public List<Repair> selectRepair(){
        System.out.println("/Repair/selectRepair");
        return repairService.selectRepair();
    }


}
